//
//  DrawEcgAnno.h
//  Ikinloop-demo
//
//  Created by Li Shen on 2021/4/23.
//  Copyright © 2021 lyh. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface DrawEcgAnno : NSObject
//采样率
@property (nonatomic, assign) CGFloat sampleRate;
//走纸速度
@property (nonatomic, assign) CGFloat ecgSpeed;
//增益
@property (nonatomic, assign) CGFloat ecgGain;
//波形图颜色
@property (nonatomic, strong) UIColor *ecgColor;
//画布宽度
@property (nonatomic, assign) CGFloat lineWidth;
//心电数据状态配置
@property (nonatomic, strong) NSArray *ecgstateOptions;

- (instancetype)initWithLayer:(CALayer*)layer;
- (instancetype)initWithLayer:(CALayer*)layer context:(CGContextRef)context;

- (void)reload;

- (void)drawLineEcg:(NSArray*)ecgdatas ecgStates:(NSArray*)ecgStates;

- (void)getEcgStateByXY:(CGPoint)point;

- (CGFloat)getxStepPixelPerPoint;

- (int)getPointMaxNumPerScreen;
@end

NS_ASSUME_NONNULL_END
